package com.sinopec.basemodule.http.api;

import com.sinopec.basemodule.model.app_model.SplashPicModel;
import com.sinopec.basemodule.model.app_model.WelcomeModel;
import com.sinopec.basemodule.model.login_model.ConfigInfo;
import com.sinopec.basemodule.model.MineInfoModel;

import java.util.HashMap;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface AppService {

    @Headers("Content-Type: application/json")
    @POST("appBaseConfig/getAppStartPicture")
    Observable<HttpResult<SplashPicModel>> requestSplashImg(@Body HashMap<String, String> hashMap);

    /**
     * @author lwj
     * @Description: 获取基础配置接口
     */
    @Headers("Content-Type: application/json")
    @POST("api/baseBusinessConfig/getBaseBusinessConfig")
    Observable<HttpResult<ConfigInfo>> requestConfig(@Body HashMap<String, String> hashMap);

    /**
     * @author lwj
     * @Description: 下载文件
     */
    @Streaming
    @GET
    Observable<ResponseBody> downloadFile(@Url String Path);

    /**
     * @author lwj
     * @Description:查询app启动图
     * @date 2019/3/6 11:06
     */
    @Headers("Content-Type: application/json")
    @POST("api/user/getStarFigure4Customer")
    Observable<HttpResult<WelcomeModel>> getStarTheFigure(@Body HashMap<String, String> hashMap);

    /**
     * 获取我的相关信息
     */
    @Headers("Content-Type: application/json")
    @POST("api/scoreShop/getMineScoreShopInfo")
    Observable<HttpResult<MineInfoModel>> getMineInfo(@Body HashMap<String, String> hashMap);
}
